import java.io.*;
import org.antlr.runtime.*;
import org.antlr.runtime.tree.*;

public class simple_expression_ast {
    public static void main(String args[]) throws Exception {
        ANTLRInputStream input = new ANTLRInputStream(System.in);
        simple_expression_astLexer lex = new simple_expression_astLexer(input);
        CommonTokenStream tokens = new CommonTokenStream(lex);

        simple_expression_astParser parser = new simple_expression_astParser(tokens);
        simple_expression_astParser.prog_return r = parser.prog();
        if ( r!=null ) System.out.println(((CommonTree)r.tree).toStringTree());

        /*CommonTreeNodeStream nodes = new CommonTreeNodeStream((Tree)r.tree);
        nodes.setTokenStream(tokens);
        simple_expression_astP walker = new simple_expression_astP(nodes);
        simple_expression_astP.progRule_return r2 = walker.progRule();
        CommonTree rt = ((CommonTree)r2.tree);
        // if tree parser constructs trees
        if ( rt!=null ) System.out.println(((CommonTree)r2.tree).toStringTree());      */         
    }
}

